import config from '@/constant/defaultSettings';
const { MAIN_CONFIG } = config;
const { microServiceMap: services } = MAIN_CONFIG;

const serviceIdMap = {};
Object.keys(services).forEach((key) => {
  services[key].forEach((module: any) => {
    serviceIdMap[module] = key;
  });
});

const urlMap = {};
Object.keys(services).forEach((key) => {
  urlMap[key] = key;
});

export default { urlMap, serviceIdMap };
